/*
 * XML Type:  PeriodToDate
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PeriodToDate
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PeriodToDate(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PeriodToDateImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.PeriodToDate
{
    
    public PeriodToDateImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName DTSTART$0 = 
        new javax.xml.namespace.QName("", "DTSTART");
    private static final javax.xml.namespace.QName DTEND$2 = 
        new javax.xml.namespace.QName("", "DTEND");
    private static final javax.xml.namespace.QName CONTRIBUTIONS$4 = 
        new javax.xml.namespace.QName("", "CONTRIBUTIONS");
    private static final javax.xml.namespace.QName WITHDRAWALS$6 = 
        new javax.xml.namespace.QName("", "WITHDRAWALS");
    private static final javax.xml.namespace.QName EARNINGS$8 = 
        new javax.xml.namespace.QName("", "EARNINGS");
    
    
    /**
     * Gets the "DTSTART" element
     */
    public java.lang.String getDTSTART()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTSTART$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTSTART" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTSTART()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTSTART$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DTSTART" element
     */
    public void setDTSTART(java.lang.String dtstart)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTSTART$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTSTART$0);
            }
            target.setStringValue(dtstart);
        }
    }
    
    /**
     * Sets (as xml) the "DTSTART" element
     */
    public void xsetDTSTART(net.ofx.types.x2003.x04.DateTimeType dtstart)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTSTART$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTSTART$0);
            }
            target.set(dtstart);
        }
    }
    
    /**
     * Gets the "DTEND" element
     */
    public java.lang.String getDTEND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTEND$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTEND" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTEND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTEND$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DTEND" element
     */
    public void setDTEND(java.lang.String dtend)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTEND$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTEND$2);
            }
            target.setStringValue(dtend);
        }
    }
    
    /**
     * Sets (as xml) the "DTEND" element
     */
    public void xsetDTEND(net.ofx.types.x2003.x04.DateTimeType dtend)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTEND$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTEND$2);
            }
            target.set(dtend);
        }
    }
    
    /**
     * Gets the "CONTRIBUTIONS" element
     */
    public net.ofx.types.x2003.x04.Contributions getCONTRIBUTIONS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Contributions target = null;
            target = (net.ofx.types.x2003.x04.Contributions)get_store().find_element_user(CONTRIBUTIONS$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "CONTRIBUTIONS" element
     */
    public boolean isSetCONTRIBUTIONS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CONTRIBUTIONS$4) != 0;
        }
    }
    
    /**
     * Sets the "CONTRIBUTIONS" element
     */
    public void setCONTRIBUTIONS(net.ofx.types.x2003.x04.Contributions contributions)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Contributions target = null;
            target = (net.ofx.types.x2003.x04.Contributions)get_store().find_element_user(CONTRIBUTIONS$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Contributions)get_store().add_element_user(CONTRIBUTIONS$4);
            }
            target.set(contributions);
        }
    }
    
    /**
     * Appends and returns a new empty "CONTRIBUTIONS" element
     */
    public net.ofx.types.x2003.x04.Contributions addNewCONTRIBUTIONS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Contributions target = null;
            target = (net.ofx.types.x2003.x04.Contributions)get_store().add_element_user(CONTRIBUTIONS$4);
            return target;
        }
    }
    
    /**
     * Unsets the "CONTRIBUTIONS" element
     */
    public void unsetCONTRIBUTIONS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CONTRIBUTIONS$4, 0);
        }
    }
    
    /**
     * Gets the "WITHDRAWALS" element
     */
    public net.ofx.types.x2003.x04.Withdrawals getWITHDRAWALS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Withdrawals target = null;
            target = (net.ofx.types.x2003.x04.Withdrawals)get_store().find_element_user(WITHDRAWALS$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "WITHDRAWALS" element
     */
    public boolean isSetWITHDRAWALS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(WITHDRAWALS$6) != 0;
        }
    }
    
    /**
     * Sets the "WITHDRAWALS" element
     */
    public void setWITHDRAWALS(net.ofx.types.x2003.x04.Withdrawals withdrawals)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Withdrawals target = null;
            target = (net.ofx.types.x2003.x04.Withdrawals)get_store().find_element_user(WITHDRAWALS$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Withdrawals)get_store().add_element_user(WITHDRAWALS$6);
            }
            target.set(withdrawals);
        }
    }
    
    /**
     * Appends and returns a new empty "WITHDRAWALS" element
     */
    public net.ofx.types.x2003.x04.Withdrawals addNewWITHDRAWALS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Withdrawals target = null;
            target = (net.ofx.types.x2003.x04.Withdrawals)get_store().add_element_user(WITHDRAWALS$6);
            return target;
        }
    }
    
    /**
     * Unsets the "WITHDRAWALS" element
     */
    public void unsetWITHDRAWALS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(WITHDRAWALS$6, 0);
        }
    }
    
    /**
     * Gets the "EARNINGS" element
     */
    public net.ofx.types.x2003.x04.Earnings getEARNINGS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Earnings target = null;
            target = (net.ofx.types.x2003.x04.Earnings)get_store().find_element_user(EARNINGS$8, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "EARNINGS" element
     */
    public boolean isSetEARNINGS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(EARNINGS$8) != 0;
        }
    }
    
    /**
     * Sets the "EARNINGS" element
     */
    public void setEARNINGS(net.ofx.types.x2003.x04.Earnings earnings)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Earnings target = null;
            target = (net.ofx.types.x2003.x04.Earnings)get_store().find_element_user(EARNINGS$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Earnings)get_store().add_element_user(EARNINGS$8);
            }
            target.set(earnings);
        }
    }
    
    /**
     * Appends and returns a new empty "EARNINGS" element
     */
    public net.ofx.types.x2003.x04.Earnings addNewEARNINGS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Earnings target = null;
            target = (net.ofx.types.x2003.x04.Earnings)get_store().add_element_user(EARNINGS$8);
            return target;
        }
    }
    
    /**
     * Unsets the "EARNINGS" element
     */
    public void unsetEARNINGS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(EARNINGS$8, 0);
        }
    }
}
